﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ThresholdModeling
{
    public class MembersGroup
    {
        private int _groupID;

        public int GroupID
        {
            get { return _groupID; }
            set { _groupID = value; }
        }

        private String _groupName;

        public String GroupName
        {
            get { return _groupName; }
            set { _groupName = value; }
        }

        private String _password;

        public String Password
        {
            get { return _password; }
            set { _password = value; }
        }

        private int _nMembers;

        public int NMembers
        {
            get { return _nMembers; }
            set { _nMembers = value; }
        }

        private int _kMembers;

        public int KMembers
        {
            get { return _kMembers; }
            set { _kMembers = value; }
        }

        private BigInteger _M;

        public BigInteger M
        {
            get { return _M; }
            set { _M = value; }
        }

        private String _hashSecret;

        public String HashSecret
        {
            get { return _hashSecret; }
        }

        //Exponent Cryptographer Function
        private int _k_ExpMod;

        public int K_ExpMod
        {
            get { return _k_ExpMod; }
            set { _k_ExpMod = value; }
        }

        private int _p_ExpMod;

        public int P_ExpMod
        {
            get { return _p_ExpMod; }
            set { _p_ExpMod = value; }
        }
        /////////////////////////////////

        public MembersGroup()
        {

        }

        public MembersGroup(MembersGroup src)
        {
            _groupID = src._groupID;
            _groupName = src._groupName;
            _password = src._password;
            _nMembers = src._nMembers;
            _kMembers = src._kMembers;
            _M = src._M;
            _hashSecret = src._hashSecret;
            _k_ExpMod = src._k_ExpMod;
            _p_ExpMod = src._p_ExpMod;
        }

        public MembersGroup(String name)
        {
            _groupName = name;
        }

        public MembersGroup(int id, String name)
        {
            _groupID = id;
            _groupName = name;
        }

        public MembersGroup(int id, String name, String pass, int n, int k)
        {
            _groupID = id;
            _groupName = name;
            _password = pass;
            _nMembers = n;
            _kMembers = k;
            _M = 0;
        }

        public MembersGroup(int id, String name, String pass, int n, int k, BigInteger M)
        {
            _groupID = id;
            _groupName = name;
            _password = pass;
            _nMembers = n;
            _kMembers = k;
            _M = M;
        }

        public MembersGroup(int id, String name, String pass, int n, int k, BigInteger M, String secret)
        {
            _groupID = id;
            _groupName = name;
            _password = pass;
            _nMembers = n;
            _kMembers = k;
            _M = M;
            _hashSecret = secret;
        }

        public MembersGroup(int id, String name, String pass, int n, int k, BigInteger M, String secret, int kexp, int pexp)
        {
            _groupID = id;
            _groupName = name;
            _password = pass;
            _nMembers = n;
            _kMembers = k;
            _M = M;
            _hashSecret = secret;
            _k_ExpMod = kexp;
            _p_ExpMod = pexp;
        }
    }
}
